<? if ($c = stack('name')) {
	
	//startScript('jquery.form');
	startScript('jquery.enablePlaceholder');
	?><script type="text/javascript">
		$("#cpn-<?=$c?> .search").enablePlaceholder();
		/*
		var minLen = 7;
		$("#cpn-<?=$c?> form").submit(function() {
			//console.log('$("#cpn-<?=$c?> .search").val()= '+$("#cpn-<?=$c?> .search").val()+', $("#cpn-<?=$c?> .search").val().length= '+$("#cpn-<?=$c?> .search").val().length);
			if ($("#cpn-<?=$c?> .search").val().length>(minLen-1)) return true; // alert('Временно не доступно');
			else alert('Слова не короче '+minLen+' символов');
			return false;
		});
		*/
	</script><? endScript();

	?><div id="cpn-<?=$c?>" class="cpn-search"><?
			?><form action="/<?=$CONTEXT['lang_prefix']?>search/" method="get">
<input name="q" type="text" class="search" value="<?=h(getdata('q'))?>" placeholder="<?=htc('Пошук на сайті')?>">
<input type="submit" class="submit" value=" ">
				<div class="clearer"></div> <?//=htc('Search')?>
			</form><?
	?></div><?

	unstack();
}


